/**
 * Copyright © 2020 易久批信息技术有限公司. All rights reserved.
 */
package com.dysm.chainofresp;

/**
 * 经理
 * @author xiay
 * @since 2020/12/13 8:32 下午
 */
public class Manager extends Leader {

    public Manager(String name) {
        super(name);
    }

    @Override
    public void handleLeave(LeaveRequest request) {
        int leaveDayNum = request.getLeaveDayNum();
        if (leaveDayNum < 10) {
            System.out.println("经理：" + this.name + "通过" + request.getUserName() +"的请假审批，请假天数：" +
                    request.getLeaveDayNum() + "，请假原因：" + request.getReason());
        } else {
            nextLeader.handleLeave(request);
        }
    }
}
